package test.JDBCfieldAssertion;

import java.beans.PropertyDescriptor;

import org.apache.jmeter.protocol.jdbc.AbstractJDBCTestElement;
import org.apache.jmeter.protocol.jdbc.JDBCTestElementBeanInfoSupport;
import org.apache.jmeter.testbeans.BeanInfoSupport;
import org.apache.jmeter.testbeans.TestBean;
import org.apache.jmeter.testbeans.gui.TypeEditor;

public class JDBCfieldAssertionBeanInfo extends BeanInfoSupport{
	static final String SELECT   = "Select Statement"; // $NON-NLS-1$
	static final String RS_STORE_AS_STRING = "Store as String"; // $NON-NLS-1$
	public JDBCfieldAssertionBeanInfo() {
		super(JDBCfieldAssertion.class);
		
		createPropertyGroup("varName", // $NON-NLS-1$
				new String[]{"dataSource" }); // $NON-NLS-1$
		createPropertyGroup("TestExpression", 
				new String[]{"testExpression"});
		
		createPropertyGroup("saveName", // $NON-NLS-1$
				new String[]{"saveVariables" }); // $NON-NLS-1$
		

        
        createPropertyGroup("sql", // $NON-NLS-1$
                new String[] {
 
                "query"
                });
        
        
        PropertyDescriptor p = property("testExpression"); // $NON-NLS-1$
        p.setValue(NOT_UNDEFINED, Boolean.TRUE);
        p.setValue(DEFAULT, ""); // $NON-NLS-1$
        
        

        
        p = property("saveVariables"); // $NON-NLS-1$
        p.setValue(NOT_UNDEFINED, Boolean.TRUE);
        p.setValue(DEFAULT, ""); // $NON-NLS-1$
        
        p = property("dataSource"); // $NON-NLS-1$
        p.setValue(NOT_UNDEFINED, Boolean.TRUE);
        p.setValue(DEFAULT, ""); // $NON-NLS-1$


        p = property("query", TypeEditor.TextAreaEditor); // $NON-NLS-1$
        p.setValue(NOT_UNDEFINED, Boolean.TRUE);
        p.setValue(DEFAULT, ""); // $NON-NLS-1$
        p.setValue(TEXT_LANGUAGE, "sql");  // $NON-NLS-1$
	}

}
